//
//  ZJSSpepLineTableViewCell.m
//  ZJS-DRIVER
//
//  Created by zxx on 2017/6/14.
//  Copyright © 2017年 zall. All rights reserved.
//

#import "ZJSSpepLineTableViewCell.h"

@implementation ZJSSpepLineTableViewCell

/**
 *  修改cell分割线
 */
- (void)drawRect:(CGRect)rect
{
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    CGContextSetFillColorWithColor(context, [UIColor whiteColor].CGColor);
    CGContextFillRect(context, rect);
    if (!_isSeparatorLineHidden) {
        CGContextSetStrokeColorWithColor(context, UIColorFromHexRGB(0xdddddd).CGColor);
        CGContextStrokeRect(context, CGRectMake(16, rect.size.height - 0.5, rect.size.width - 16, 0.5));
    }else{
        CGContextSetStrokeColorWithColor(context, [UIColor whiteColor].CGColor);
        CGContextStrokeRect(context, CGRectMake(0, rect.size.height, rect.size.width, 0));
    }
    
    
}
#pragma mark - setter
- (void)setIsSeparatorLineHidden:(BOOL)isSeparatorLineHidden{
    _isSeparatorLineHidden = isSeparatorLineHidden;
    [self sizeToFit];
}

@end
